<?php
class indexMod extends commonMod{

	public function index(){


		// 首页BANNER广告
		$ads = __query("select * from {tabpre}ads where classid='1109' and `show`=1 and `recover`=0 order by sequence desc,id desc");
		if (! empty($ads)) {
			foreach ($ads as $k=>$v) {
								
				$adstr .= '<li><a href="'. $v['content'] .'" target="_blank">
				<img src="'. get_imgurl($v['pic']) .'" width="1920" height="768" />
				<div class="banner_main"><div class="banner_con"><h1>'.$v['title'].'</h1><h2>'.$v['title2'].'</h2></div></div>
				</a></li>';
	  	  
				$adstr_li .= '<li>'.($k+1).'</li>';
			}
		}
		
		// 新闻中心
		$news = __query("select * from {tabpre}news where `show`=1 and `recover`=0 and `rmd`=1 order by sequence desc,id desc limit 4");
		$this->assign('news', $news);
		
		// 案例展示
		$case = __query("select * from {tabpre}case where pic2<>'' and `show`=1 and `recover`=0 and `rmd`=1 order by sequence desc,id desc limit 4");
		$this->assign('case', $case);
		
		
		$this->assign('all_nav_1', true);
		$this->assign('adstr', $adstr);
		$this->assign('adstr_li', $adstr_li);
		$this->display('index');
	}

}